package com.globallogic.week3.servlet;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

import com.globallogic.week3.util.AuthUserHandler;
import com.globallogic.week3.util.UserHandler;

@WebListener
public class ServletContextConfig implements ServletContextListener{

	@Override
	public void contextDestroyed(ServletContextEvent event) {
		
	}

	@Override
	public void contextInitialized(ServletContextEvent event) {
		event.getServletContext().setAttribute("handler", new UserHandler());
		event.getServletContext().setAttribute("authUserHandler", new AuthUserHandler());
	}

}
